package view
{
	import assets.view.ContentViewSymbol;
	
	import flash.display.DisplayObject;
	import flash.display.Graphics;
	import flash.events.Event;
	
	import model.vo.ViewVO;
	

	public class ContentView extends ContentViewSymbol
	{
		public static const NAME:String 				= "ContentView";
		public static const SHOW:String 				= "Show";
		
		public static const CHANGED:String				= NAME + "Changed";
		
//		public static const SHOW:String					= NAME + "Show";
		
		private var contentViewData:Array;
		
		private var viewData:ViewVO;
		private var contentWidth:Number;
		private var contentHeight:Number;
		
		private var contentType:String;
		
		private var frameStroke:Number;
		private var frameColor:int;
		
		private var type:String;
		
		public function ContentView()
		{
		}
		
		public function show():void
		{			
			var component:Object = contentContainer.getChildAt( 0 );
			component.show();
		}
		
		public function init( data:Array, viewVO:ViewVO ):void
		{
			contentViewData = data[0] as Array;
			viewData = viewVO;
			contentWidth = ApplicationFacade.APP_WIDTH;
			
			setContentViewProperties();
		}
		
		public function addComponent( obj:Object ):void
		{			
			contentContainer.addChild( obj as DisplayObject );
		}
		
		public function removeComponents():void
		{
			while( contentContainer.numChildren > 0 ) contentContainer.removeChildAt( 0 );
		}
		
		private function setContentViewProperties():void
		{
			frameStroke = viewData.frameWeight;
			frameColor  = viewData.frameColor;
		}
		private function buildContentView():void
		{
		}
		
		private function listExpandedHandler( e:Event ):void
		{
			
		}
	}
}